﻿using System;
using System.Net;

namespace FbHelperWP7NonUi.Settings
{
    public sealed class StyleSettings
    {
        internal delegate void StyleChanged();
        internal event StyleChanged StyleChangedEvent;

        private int fontSize = 10;
        private bool isItalic = false;
        private bool isbold = false;

        public StyleSettings()
        {
        }

        public int FontSize
        {
            get
            {
                return fontSize;
            }
            set
            {
                int oldValue = fontSize;

                fontSize = value;

                if (oldValue != value && StyleChangedEvent != null)
                    StyleChangedEvent();
            }
        }

        public bool IsItalic
        {
            get
            {
                return isItalic;
            }
            set
            {
                bool oldValue = isItalic;

                isItalic = value;

                if (oldValue != value && StyleChangedEvent != null)
                    StyleChangedEvent();
            }
        }

        public bool IsBold
        {
            get
            {
                return isbold;
            }
            set
            {
                bool oldValue = isbold;

                isbold = value;

                if (oldValue != value && StyleChangedEvent != null)
                    StyleChangedEvent();
            }
        }
    }
}
